﻿using System;
using OneMG.Phoenix.Entity;
using OneMG.Phoenix.Respository;
using IBatisNet.DataMapper;
using OneMG.Phoenix.Kernel.IBatisUtil;

namespace OneMG.Phoenix.IBatisRepository
{
    public class SiteConfigRepository : BaseIBatisDao,ISiteConfig
    {
        public SiteConfigRepository()
            : base("yihaoke_newMap.Config")
        {

        }
        public System.Int32 AddSiteConfig(ESiteConfig entity)
        {
			string stmtId = "SiteConfigMap.InsertSiteConfig";
			 Object obj = base.SqlMapper.Insert(stmtId, entity);
			 return (System.Int32)obj;
        }
        
		public  ESiteConfig GetByConfigID (System.Int32 configID)
        {
			string stmtId = "SiteConfigMap.SelectByConfigID";
			return base.SqlMapper.QueryForObject<ESiteConfig>(stmtId, configID);
        }
        
        public  void DeleteByConfigID (System.Int32 configID)
        {
			string stmtId = "SiteConfigMap.DeleteByConfigID";
			base.SqlMapper.Update(stmtId, configID);
        }
        
        public  void UpdateByConfigID (ESiteConfig entity)
        {
			string stmtId = "SiteConfigMap.UpdateByConfigID";
			base.SqlMapper.Update(stmtId, entity);
        }

    }
}

